<template>
    <h1 v-if="show">红楼梦</h1>
    <hr>
    <button @click="show = true">if显示</button>
    <button @click="show = false">if隐藏</button>
    <hr>
    <h1 v-show="showShui">水浒传</h1>
    <button @click="showShui=!showShui">显示/隐藏</button>
</template>

<script setup>
import { ref } from 'vue';


const show = ref(true);
const showShui = ref(true);


</script>

<style lang="scss" scoped>

</style>